<html>
    <meta charset='utf8'>
    <body>
        <form action="">
            <p>行号：<input type="text" name='id'></p>
            <p>姓名：<input type="text" name='username'></p>
            <p>电话：<input type="text" name='phone'></p>
            <button>修改</button>
        </form>
    </body> 
</html>

<?php
    $id = $_REQUEST["id"];
    $username = $_REQUEST["username"];
    $phone = $_REQUEST["phone"];
    
    if(!$id || !$username || !$phone){
        die();
    }

    echo $id.'</br>';
    echo $username.'</br>';
    echo $phone.'</br>';

    $link = mysql_connect("localhost","root","root");
    mysql_select_db(test);
    mysql_query("set names utf8");    

    // 修改:"UPDATE `表名` SET `字段1`='数据1',`字段2`='数据2' WHERE `id`=行号"
    $upsql = "UPDATE `userlist` SET `username`='$username',`phone`='$phone' WHERE `id`=$id";
    mysql_query($upsql);


    mysql_close($link);
?>